class Solution {
    public int takeAttendance(int[] records) {
        int[] arr = new int[records.length+1];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = i;
        }
        int sumArr = 0;
        for (int i = 0; i < arr.length; i++) {
            sumArr += arr[i];
        }
        int sumRecords = 0;
        for (int i = 0; i < records.length; i++) {
            sumRecords += records[i];
        }
        return sumArr - sumRecords;
    }
}